package com.example.demo.domin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Generated;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaohe
 * @since 2025-04-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    private String userName;

    private Integer age;

    private String gender;

    private String status;

    private String password;

    private String avatar;

    private String phone;

    private String email;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    private String local;

    private int deleted;
    @Generated
    public User() {
    }

    @Generated
    public Integer getUserId() {
        return this.userId;
    }

    @Generated
    public String getUserName() {
        return this.userName;
    }

    @Generated
    public Integer getAge() {
        return this.age;
    }

    @Generated
    public String getGender() {
        return this.gender;
    }

    @Generated
    public String getStatus() {
        return this.status;
    }

    @Generated
    public String getPassword() {
        return this.password;
    }

    @Generated
    public String getAvatar() {
        return this.avatar;
    }

    @Generated
    public String getPhone() {
        return this.phone;
    }

    @Generated
    public String getEmail() {
        return this.email;
    }

    @Generated
    public LocalDateTime getCreatedAt() {
        return this.createdAt;
    }

    @Generated
    public LocalDateTime getUpdatedAt() {
        return this.updatedAt;
    }

    @Generated
    public String getLocal() {
        return this.local;
    }

    @Generated
    public int getDeleted() {
        return this.deleted;
    }

    @Generated
    public User setUserId(final Integer userId) {
        this.userId = userId;
        return this;
    }

    @Generated
    public User setUserName(final String userName) {
        this.userName = userName;
        return this;
    }

    @Generated
    public User setAge(final Integer age) {
        this.age = age;
        return this;
    }

    @Generated
    public User setGender(final String gender) {
        this.gender = gender;
        return this;
    }

    @Generated
    public User setStatus(final String status) {
        this.status = status;
        return this;
    }

    @Generated
    public User setPassword(final String password) {
        this.password = password;
        return this;
    }

    @Generated
    public User setAvatar(final String avatar) {
        this.avatar = avatar;
        return this;
    }

    @Generated
    public User setPhone(final String phone) {
        this.phone = phone;
        return this;
    }

    @Generated
    public User setEmail(final String email) {
        this.email = email;
        return this;
    }

    @Generated
    public User setCreatedAt(final LocalDateTime createdAt) {
        this.createdAt = createdAt;
        return this;
    }

    @Generated
    public User setUpdatedAt(final LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
        return this;
    }

    @Generated
    public User setLocal(final String local) {
        this.local = local;
        return this;
    }

    @Generated
    public User setDeleted(final int deleted) {
        this.deleted = deleted;
        return this;
    }

    @Generated
    public String toString() {
        Integer var10000 = this.getUserId();
        return "User(userId=" + var10000 + ", userName=" + this.getUserName() + ", age=" + this.getAge() + ", gender=" + this.getGender() + ", status=" + this.getStatus() + ", password=" + this.getPassword() + ", avatar=" + this.getAvatar() + ", phone=" + this.getPhone() + ", email=" + this.getEmail() + ", createdAt=" + this.getCreatedAt() + ", updatedAt=" + this.getUpdatedAt() + ", local=" + this.getLocal() + ", deleted=" + this.getDeleted() + ")";
    }

    @Generated
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof User)) {
            return false;
        } else {
            User other = (User)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (this.getDeleted() != other.getDeleted()) {
                return false;
            } else {
                label157: {
                    Object this$userId = this.getUserId();
                    Object other$userId = other.getUserId();
                    if (this$userId == null) {
                        if (other$userId == null) {
                            break label157;
                        }
                    } else if (this$userId.equals(other$userId)) {
                        break label157;
                    }

                    return false;
                }

                label150: {
                    Object this$age = this.getAge();
                    Object other$age = other.getAge();
                    if (this$age == null) {
                        if (other$age == null) {
                            break label150;
                        }
                    } else if (this$age.equals(other$age)) {
                        break label150;
                    }

                    return false;
                }

                Object this$userName = this.getUserName();
                Object other$userName = other.getUserName();
                if (this$userName == null) {
                    if (other$userName != null) {
                        return false;
                    }
                } else if (!this$userName.equals(other$userName)) {
                    return false;
                }

                label136: {
                    Object this$gender = this.getGender();
                    Object other$gender = other.getGender();
                    if (this$gender == null) {
                        if (other$gender == null) {
                            break label136;
                        }
                    } else if (this$gender.equals(other$gender)) {
                        break label136;
                    }

                    return false;
                }

                Object this$status = this.getStatus();
                Object other$status = other.getStatus();
                if (this$status == null) {
                    if (other$status != null) {
                        return false;
                    }
                } else if (!this$status.equals(other$status)) {
                    return false;
                }

                label122: {
                    Object this$password = this.getPassword();
                    Object other$password = other.getPassword();
                    if (this$password == null) {
                        if (other$password == null) {
                            break label122;
                        }
                    } else if (this$password.equals(other$password)) {
                        break label122;
                    }

                    return false;
                }

                Object this$avatar = this.getAvatar();
                Object other$avatar = other.getAvatar();
                if (this$avatar == null) {
                    if (other$avatar != null) {
                        return false;
                    }
                } else if (!this$avatar.equals(other$avatar)) {
                    return false;
                }

                Object this$phone = this.getPhone();
                Object other$phone = other.getPhone();
                if (this$phone == null) {
                    if (other$phone != null) {
                        return false;
                    }
                } else if (!this$phone.equals(other$phone)) {
                    return false;
                }

                Object this$email = this.getEmail();
                Object other$email = other.getEmail();
                if (this$email == null) {
                    if (other$email != null) {
                        return false;
                    }
                } else if (!this$email.equals(other$email)) {
                    return false;
                }

                label94: {
                    Object this$createdAt = this.getCreatedAt();
                    Object other$createdAt = other.getCreatedAt();
                    if (this$createdAt == null) {
                        if (other$createdAt == null) {
                            break label94;
                        }
                    } else if (this$createdAt.equals(other$createdAt)) {
                        break label94;
                    }

                    return false;
                }

                label87: {
                    Object this$updatedAt = this.getUpdatedAt();
                    Object other$updatedAt = other.getUpdatedAt();
                    if (this$updatedAt == null) {
                        if (other$updatedAt == null) {
                            break label87;
                        }
                    } else if (this$updatedAt.equals(other$updatedAt)) {
                        break label87;
                    }

                    return false;
                }

                Object this$local = this.getLocal();
                Object other$local = other.getLocal();
                if (this$local == null) {
                    if (other$local != null) {
                        return false;
                    }
                } else if (!this$local.equals(other$local)) {
                    return false;
                }

                return true;
            }
        }
    }

    @Generated
    protected boolean canEqual(final Object other) {
        return other instanceof User;
    }

    @Generated
    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        result = result * 59 + this.getDeleted();
        Object $userId = this.getUserId();
        result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
        Object $age = this.getAge();
        result = result * 59 + ($age == null ? 43 : $age.hashCode());
        Object $userName = this.getUserName();
        result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
        Object $gender = this.getGender();
        result = result * 59 + ($gender == null ? 43 : $gender.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $password = this.getPassword();
        result = result * 59 + ($password == null ? 43 : $password.hashCode());
        Object $avatar = this.getAvatar();
        result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
        Object $phone = this.getPhone();
        result = result * 59 + ($phone == null ? 43 : $phone.hashCode());
        Object $email = this.getEmail();
        result = result * 59 + ($email == null ? 43 : $email.hashCode());
        Object $createdAt = this.getCreatedAt();
        result = result * 59 + ($createdAt == null ? 43 : $createdAt.hashCode());
        Object $updatedAt = this.getUpdatedAt();
        result = result * 59 + ($updatedAt == null ? 43 : $updatedAt.hashCode());
        Object $local = this.getLocal();
        result = result * 59 + ($local == null ? 43 : $local.hashCode());
        return result;
    }
}
